﻿#include<QApplication>
#include<QTranslator>
#include"XQPushClient.h"
#include"XQGraphicsViewWidget.h"
#include"XQMySql.hpp"
#include"XQPushClientWindow.h"
#include"XQLog.hpp"
#include<QDebug>
#ifndef _DEBUG
#pragma comment(linker,"/subSystem:windows /entry:mainCRTStartup")
#endif // !_DEBUG

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    // 获取传递的参数列表
    QStringList args = QApplication::arguments();
    QApplication::setOrganizationName("xinyue");
    QApplication::setApplicationName("PushClient");
    QCoreApplication::setApplicationVersion("1.0.0");
    XQPushClientWindow push;
    push.show();

    //XQPushClient client;
    //using Debug=Http::Debug;
    //client.setDebugModels(Debug::HeadRequest| Debug::HeadReply|Debug::error);
    //client.setName("PushMessage");
    //client.setLogName("PushMessage");

    //client.connectToServerWait("https://www.727370630.top:6666");
    //auto Account = client.account();
    //
    //Account->Account_NewEmailVerify("727370630@qq.com");
    ////注册账号
    //XQAccountData acc;
    //acc.name = "xinyue";
    //acc.account = "727370630";
    //acc.password = "981103";
    //acc.email = "727370630@qq.com";
    //acc.phone = "18368998112";
    //acc.portrait_data.load("新海天.jpg");
    ////acc.portrait_data.load("1.png");
    ////Account->Account_Register(acc,"337250");
    //Account->Account_Login("727370630","981103");
    ////Account->Account_Info();
    ////Account->Account_Info("727370630", "981103");
    ////Account->Account_ModifyPassword("727370630", "jxy981103","981103");
    ////Account->Account_ModifyInfo(acc);
    
    //Account->Account_portrait("727370630");
    //Account->wait();
    //auto account = Account->account();
    //if(!account.portrait_data.isNull())
    //{
    //    //显示图片
    //    auto view = new XQGraphicsViewWidget;
    //    view->resize(1300, 760);
    //    view->setPixmap(QPixmap::fromImage(account.portrait_data));
    //    XQDebug << "显示图片";
    //    view->show();
    //}
    return a.exec();
}
